<template>
	<view class="xb-page">
		<scroll-view>
		<view class="xb-form-cell">
                        <view class="xb-form-cell-row">
                             <view class="xb-form-cell-title">title</view>
						<picker mode="date" class="input_back" :start="contract_time"> {{chargedate}</view></view></view>
						
						</picker>
					</view>
					<view class="xb-form-cell">
                        <view class="xb-form-cell-row">
                             <view class="xb-form-cell-title">title</view>
						<picker mode="date" class="input_back" :start="contract_time"></view></view>
							
						</picker>
					</view>

					<view class="xb-section-title">
						<view class="section-title">合约信息</view>
						<view class="xb-form-cell">
                        <view class="xb-form-cell-row">
                             <view class="xb-form-cell-title">title</view>
							<picker class="input_back" mode="selector" :range="subjectList">课程</picker>
						</view></view>
						<view class="xb-form-cell">
                        <view class="xb-form-cell-row">
                             <view class="xb-form-cell-title">title</view><input class="input_back" placeholder="课时"></input></view>
						<view class="xb-form-cell">
                        <view class="xb-form-cell-row">
                             <view class="xb-form-cell-title">title</view><input class="input_back" placeholder="课时单价"></input></view></view>
						<view class="xb-form-cell">
                        <view class="xb-form-cell-row">
                             <view class="xb-form-cell-title">title</view><input class="input_back" placeholder="课程金额"></input></view>
						<view class="xb-form-cell">
                        <view class="xb-form-cell-row">
                             <view class="xb-form-cell-title">title</view><input class="input_back" placeholder="已上课课时"></input></view></view>
					</view>
					<view class="discount_info">
						<view class="section-title">购买优惠与其他金额</view>
						<view class="xb-form-cell">
                        <view class="xb-form-cell-row">
                             <view class="xb-form-cell-title">title</view><input class="input_back" placeholder="折扣%"></input></view>
						<view class="xb-form-cell">
                        <view class="xb-form-cell-row">
                             <view class="xb-form-cell-title">title</view><input class="input_back" placeholder="优惠金额"></input></view>
						<view class="xb-form-cell">
                        <view class="xb-form-cell-row">
                             <view class="xb-form-cell-title">title</view><input class="input_back" placeholder="其他金额"></input></view>
						<view class="xb-form-cell">
                        <view class="xb-form-cell-row">
                             <view class="xb-form-cell-title">title</view><input class="input_back" placeholder="赠送课时"></input></view>
					</view>
					<view class="comments">
						<view class="section-title">备注</view>
						<textarea class="input_back comment-textarea" placeholder-class="input_back" placeholder="(选填)"></textarea>

					</view>
				</view>
			</view>
		</scroll-view>
		<view class="uni-flex uni-row fix-bottom" style="justify-content: space-between;">
			<view class="uni-flex uni-column">
				<view>总金额:￥{{total}}</view>
				<view>已优惠 ￥{{discount}}</view>
			</view>
			<view><button class="submit_btn" @click="submitform" form-type="submit" type="default" size="mini">提交</button></view>

		</view>
	</view>
	</view>
</template>

<script>
	import pageHead from '../../../components/page-head.vue'
	import  {mapState,mapGetter,mapMutations} from 'vuex'
	export default {
		data() {
			return {
				charegedate: '2018-01-01',
				endtime: '2018-01-01',


			}

		},
		methods: {
			submitform :async function(e){
				const res= await buycharge(formdata);
				if(res.success==true){
					
				}else {
					
				}
			},
			initData() {
				let data = formData;
				uni.request({
					url: '/api/',
					method: 'POST',
					data: data,
					success: (data) => {
						uni.stopPullDownRefresh();
						if (data.statusCode == 200) {

						}
					},
					fail: (data, code) => {
						console.log('fail' + JSON.stringify(data));
					}
				})
			},

		}
	}
</script>

<style scoped >
	@import "../../../common/uni.css";

	.input_back {
		padding-top: 15px;
		padding-bottom: 15px;
		background-color: #F5F8FA;
		color: #9DB1BA;
	}

	.input_back_placeholder {
		background-color: #F5F8FA;
		color: #9DB1BA;
	}

	.section-title {
		padding-top: 10px;
		padding-bottom: 10px;

		color: #000000;
		font-size: 30px;
	}

	.comment-textarea {
		width: 100%;
	}

	.page-margin {
		margin-left: 30px;
		margin-right: 30px;
	}
	.fix-bottom {
		width: 100%;
		position: fixed;
		bottom: 0;
		font-size: 25px;
		background-color: #DDDDDD;
	}
</style>
